package com.zhika.zishi.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.zhika.zishi.R;
import com.zhika.zishi.customview.TitleView;
import com.zhika.zishi.interfaces.TitleInterface;

/**
 * Created by shi-02 on 2015/4/17.\
 * 修改个人信息的activity
 */
public class ModifySelfInfoActivity extends BaseActivity implements TitleInterface,View.OnClickListener{

    private TitleView titleView;

    private RelativeLayout headerLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.modify_myself_info_layout);

        initView();
    }

    private void initView(){
        titleView = (TitleView) findViewById(R.id.modify_myself_info_title_view);
        titleView.setTitleViewInterface(this);

        titleView.setLeftButtonText("返回");
        titleView.setMiddleRowText("修改个人资料");
        titleView.hideRightButton();

        headerLayout = (RelativeLayout) findViewById(R.id.modify_myself_info_header_layout);
        headerLayout.setOnClickListener(this);

    }

    @Override
    public void leftTitleListener() {
        finish();
    }

    @Override
    public void middleTitleListener() {

    }

    @Override
    public void rightTitleListener() {

    }

    @Override
    public void onClick(View v) {

        switch (v.getId()){
            case R.id.modify_myself_info_header_layout:
                headerLayoutListener();
                break;
        }
    }

    /**
     * 修改个人头像
     */
    private void headerLayoutListener(){
        Intent intent = new Intent(ModifySelfInfoActivity.this,SelectPictureActivity.class);
        startActivity(intent);
    }
}

